package com.itheima.Test2;

public class TestStudent {
    public static void main(String[] args) {
        //无参构造创建对象,通过setXxx方法给成员变量赋值
        Student stu1 = new Student();
        stu1.setAge(23);
        stu1.setName("张三");
        stu1.show();
        //2.通过带参方法,直接给属性进行赋值
        Student stu2 = new Student("李四",24);
        stu2.show();
    }
}
